package flc.ast.utils;

import androidx.annotation.Keep;

@Keep
public enum ModuleCategory {

    BASIC_INFO("baseInfoModule"),  //基本信息
    JOB_INTENTION("jobModule"),   //求职意向
    APPLICATION_INFO("applicationInfoModule"),   //报考信息
    EDUCATION_EXP("educationInfoModule"),   //教育经历
    CAMPUS_ACTIVITY("schoolExperienceModule"), //校园活动
    INTERNSHIP_EXP("internShipExperienceModule"),  //实习经历
    WORK_EXP("workExperienceModule"),    //工作经历
    PROJECT_EXP("projectExperienceModule"), //项目经验
    PROFESSIONAL_SKILL("skillModule"),  //专业技能
    HONORARY_CERTIFICATE("certificateModule"), //荣誉证书
    HOBBIES_INTERESTS("hobbyModule"),  //兴趣爱好
    SELF_EVALUATION("selfEvaluationModule"),    //自我评价
    CUSTOM_TITLE("customModule"),   //自定义标题
    ;

    private final String code;

    ModuleCategory(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public static ModuleCategory fromCode(String code) {
        for (ModuleCategory category : values()) {
            if (category.code.equals(code)) {
                return category;
            }
        }
        throw new IllegalArgumentException("No enum constant with code: " + code);
    }

}
